﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="DeleteClass.aspx.cs" Inherits="cs499.Classes.DeleteClass" %>
<%@ MasterType VirtualPath="~/Site.Master" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="NavOptions" runat="server">
    <asp:Button ID="CancelButton" runat="server" OnClick="CancelButton_Click" Text="Cancel" Width="133px" />
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="FeaturedContent" runat="server">
    <section class="featured">
        <div class="content-wrapper">
            <h3><asp:Label ID="DeleteClassLabel" runat="server" Text="Select Class to delete"></asp:Label></h3>
        </div>
    </section>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="MainContent" runat="server">
    <asp:GridView ID="GridView1" runat="server" AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="Id" DataSourceID="EntityDataSource1" OnRowDeleting="GridView1_RowDeleting">
        <Columns>
            <asp:CommandField ShowDeleteButton="True" />
            <asp:BoundField DataField="Number" HeaderText="Number" SortExpression="Number" />
            <asp:BoundField DataField="CourseTitle" HeaderText="Course Title" SortExpression="CourseTitle" />
            <asp:BoundField DataField="NumberOfSections" HeaderText="Number Of Sections" SortExpression="NumberOfSections" />
            <asp:BoundField DataField="MaximumEnrollment" HeaderText="Maximum Enrollment" SortExpression="MaximumEnrollment" />
            <asp:BoundField DataField="PlaceRequirementsstring" HeaderText="Location Requirements" SortExpression="PlaceRequirementsstring" />
        </Columns>
    </asp:GridView>
<asp:EntityDataSource ID="EntityDataSource1" runat="server" ConnectionString="name=Model1Container" DefaultContainerName="Model1Container" EntitySetName="Courses" EntityTypeFilter="Course" Where="it.DepartmentId=@newparameter" Include="" EnableDelete="True">
    <WhereParameters>
        <asp:SessionParameter DbType="Int32" DefaultValue="-1" Name="newparameter" SessionField="CurrentDepartmentId" />
    </WhereParameters>
</asp:EntityDataSource>
</asp:Content>
